package com.ss.android.common.app.permission;

import android.annotation.TargetApi;
import android.app.Activity;
import android.content.pm.PackageManager;
import android.os.Build;

public final class b implements Runnable {
    private final String[] a;
    private final Activity b;
    private final int c;

    public b(String[] arg2, Activity arg3) {
        this.a = arg2;
        this.b = arg3;
        this.c = 1;
    }

    @TargetApi(Build.VERSION_CODES.M)
    public final void run() {
        int[] v1 = new int[this.a.length];
        PackageManager v2 = this.b.getPackageManager();
        String v3 = this.b.getPackageName();
        int v4 = this.a.length;
        for (int i = 0; i < v4; ++i) {
            v1[i] = v2.checkPermission(this.a[i], v3);
        }
        this.b.onRequestPermissionsResult(this.c, this.a, v1);
    }
}

